<% isDeliver = resData.isDeliver %>
<% isCollect = resData.isCollect %>
<% postDetail = resData.postDetail %>
<% companyDetail = resData.companyDetail %>
<div class="post-page post-detail">
    <input class="postID" type="hidden" value="<%= postDetail.positionCode %>">
    <div class="bg">
        <div class="content postDetail">
            <div class="layui-row">
                <div class="layui-col-md8">
                    <div class="item">
                        <span class="status">[招聘进行中]</span>
                        <span class="time"><%= (postDetail.gmtRelease && postDetail.gmtRelease.slice(0,10)) || '--' %> 发布</span>
                    </div>
                    <div class="item">
                        <strong class="title <%= postDetail.isExpatriate ? 'wp' : '' %>"><%= postDetail.positionTitle %></strong>
                        <span class="salary"><%= postDetail.salaryFloor/1000 %>K-<%= postDetail.salaryCeiling/1000 %>K<%= (postDetail.unit || '/月') %></span>
                    </div>
                    <div class="item">
                        <span class="short"><%= (postDetail.city && postDetail.city.slice(0,-1)+' / ') || '' %> <%= postDetail.experience %> / <%= postDetail.degree %> / <%= postDetail.positionProperty %> / <%= postDetail.recruitingNum+'人' %></span>
                    </div>
                    <div class="item">
                        <% if(postDetail.positionLabel){ %>
                            <% labels = postDetail.positionLabel.split(',') || [] %>
                            <% for(var i = 0; i<labels.length; i++){ %>
                                <label class="label"><%= labels[i] %></label>
                            <% } %>
                        <% } %>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="align-right">
                        <a href="javascript:;" class="collect checkUserLogin <%= isCollect && 'selected' || '' %>">收藏</a>
                    </div>
                    <% if(isDeliver){ %>
                        <button type="button" class="layui-btn" disabled>已投递</button>
                    <% }else{ %>
                        <button type="button" class="layui-btn checkUserLogin deliverResume">立即投递</button>
                    <% } %>
                    <div class="upload">
                        <a href="/my/resume" class="float-l checkUserLogin">完善附件简历</a>
                        <a href="/my/resume" class="float-r checkUserLogin">上传附件简历</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <section class="content">
        <div class="layui-row">
            <div class="layui-col-md9 left-cnt">
                <div class="item">
                    <h3 class="title">语言要求</h3>
                    <div class="describe"><%= postDetail.language + ' ('+ postDetail.levelName +')' %></div>
                </div>
                <div class="item">
                    <h3 class="title">职位描述</h3>
                    <div class="describe">
                        <%- postDetail.positionDescription && postDetail.positionDescription.replace(/\n/g, '<br>') || '--' %>
                    </div>
                </div>
                <div class="item">
                    <h3 class="title">公司地址</h3>
                    <div class="describe">
                        <%= companyDetail.province + companyDetail.city + companyDetail.area + companyDetail.addressDetail %>
                    </div>
                </div>
                <div class="item">
                    <h3 class="title">公司介绍</h3>
                    <div class="describe">
                        <%- companyDetail.companyDescription && companyDetail.companyDescription.replace(/\n/g, '<br>') || '--' %>
                    </div>
                </div>
            </div>
            <div class="layui-col-md3 right-cnt">
                <div class="layui-row">
                    <div class="layui-col-md3">
                        <a href="/post/company/<%= companyDetail.companyCode %>.html" target="_blank">
                            <%- companyDetail.logoUrl
                                    ? '<img src="'+companyDetail.logoUrl+'" alt="">'
                                    : '<div class="short-name">'+ companyDetail.companySimpleName.slice(0,4) +'</div>'
                            %>
                        </a>
                    </div>
                    <div class="layui-col-md9">
                        <h3 class="txt-ellipsis">
                            <a href="/post/company/<%= companyDetail.companyCode %>.html" target="_blank"><%= companyDetail.companyName %></a>
                        </h3>
                        <span class="before state">已认证</span>
                    </div>
                </div>
                <div class="item before area"><%= companyDetail.companyCategory %></div>
                <div class="item before type"><%= companyDetail.companyProperty %></div>
                <div class="item before scale"><%= companyDetail.scale %></div>
                <div class="item before net"><%= companyDetail.officialWebsite || '--' %></div>
            </div>
        </div>
    </section>
</div>
<script type="text/javascript" src="/public/js/modules/post.js"></script>
<script type="text/javascript">
    gb_config_obj.init_post_detail()

</script>
